package cn.com.cetccst.datacenter.policy.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Query;

import java.util.List;

import cn.com.cetccst.datacenter.collection.dao.BaseDao;
import cn.com.cetccst.datacenter.policy.entity.BWAppEntity;
import cn.com.cetccst.datacenter.policy.entity.ComplianceEntity;

@Dao
public interface BWAppDao extends BaseDao<BWAppEntity> {
    @Query("DELETE FROM " + BWAppEntity.TABLE_NAME)
    void clearAll();

    @Query("SELECT * FROM " + BWAppEntity.TABLE_NAME)
    LiveData<List<BWAppEntity>> loadAll();

    @Query("SELECT * FROM " + BWAppEntity.TABLE_NAME +" WHERE white = 0")
    List<BWAppEntity> getBlackApps();
}
